.class Lcom/nemustech/regina/DialogCare$15;
.super Ljava/lang/Object;
.source "DialogCare.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/nemustech/regina/DialogCare;->createDialog(I)Landroid/app/Dialog;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/nemustech/regina/DialogCare;

.field final synthetic val$apps:Ljava/util/List;


# direct methods
.method constructor <init>(Lcom/nemustech/regina/DialogCare;Ljava/util/List;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 720
    iput-object p1, p0, Lcom/nemustech/regina/DialogCare$15;->this$0:Lcom/nemustech/regina/DialogCare;

    iput-object p2, p0, Lcom/nemustech/regina/DialogCare$15;->val$apps:Ljava/util/List;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 6
    .parameter "dialog"
    .parameter "which"

    .prologue
    const/4 v5, 0x1

    .line 723
    iget-object v3, p0, Lcom/nemustech/regina/DialogCare$15;->this$0:Lcom/nemustech/regina/DialogCare;

    const/16 v4, 0x8

    invoke-static {v3, v4}, Lcom/nemustech/regina/DialogCare;->access$800(Lcom/nemustech/regina/DialogCare;I)V

    .line 724
    iget-object v3, p0, Lcom/nemustech/regina/DialogCare$15;->val$apps:Ljava/util/List;

    invoke-interface {v3, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/content/pm/ResolveInfo;

    .line 725
    .local v1, info:Landroid/content/pm/ResolveInfo;
    new-instance v2, Landroid/content/Intent;

    const-string v3, "android.intent.action.MAIN"

    invoke-direct {v2, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 726
    .local v2, selectedIntent:Landroid/content/Intent;
    new-instance v0, Landroid/content/ComponentName;

    iget-object v3, v1, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

    iget-object v3, v3, Landroid/content/pm/ActivityInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    iget-object v3, v3, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;

    iget-object v4, v1, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

    iget-object v4, v4, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    invoke-direct {v0, v3, v4}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 728
    .local v0, componentName:Landroid/content/ComponentName;
    invoke-virtual {v2, v0}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;

    .line 729
    const/high16 v3, 0x1020

    invoke-virtual {v2, v3}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 731
    iget-object v3, p0, Lcom/nemustech/regina/DialogCare$15;->this$0:Lcom/nemustech/regina/DialogCare;

    invoke-static {v3}, Lcom/nemustech/regina/DialogCare;->access$200(Lcom/nemustech/regina/DialogCare;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v3

    invoke-virtual {v3}, Lcom/nemustech/regina/ReginaLauncher;->getIntent()Landroid/content/Intent;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Intent;->getComponent()Landroid/content/ComponentName;

    move-result-object v3

    invoke-virtual {v3, v0}, Landroid/content/ComponentName;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 732
    iget-object v3, p0, Lcom/nemustech/regina/DialogCare$15;->this$0:Lcom/nemustech/regina/DialogCare;

    invoke-static {v3}, Lcom/nemustech/regina/DialogCare;->access$200(Lcom/nemustech/regina/DialogCare;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v3

    invoke-virtual {v3}, Lcom/nemustech/regina/ReginaLauncher;->getReginaPref()Lcom/nemustech/regina/ReginaPreference;

    move-result-object v3

    invoke-virtual {v3, v5}, Lcom/nemustech/regina/ReginaPreference;->setInitializationStatus(I)V

    .line 733
    iget-object v3, p0, Lcom/nemustech/regina/DialogCare$15;->this$0:Lcom/nemustech/regina/DialogCare;

    invoke-static {v3}, Lcom/nemustech/regina/DialogCare;->access$200(Lcom/nemustech/regina/DialogCare;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v3

    invoke-virtual {v3}, Lcom/nemustech/regina/ReginaLauncher;->getReginaPref()Lcom/nemustech/regina/ReginaPreference;

    move-result-object v3

    invoke-virtual {v3, v5}, Lcom/nemustech/regina/ReginaPreference;->setRestartByRestore(Z)V

    .line 734
    iget-object v3, p0, Lcom/nemustech/regina/DialogCare$15;->this$0:Lcom/nemustech/regina/DialogCare;

    invoke-static {v3}, Lcom/nemustech/regina/DialogCare;->access$200(Lcom/nemustech/regina/DialogCare;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v3

    invoke-virtual {v3}, Lcom/nemustech/regina/ReginaLauncher;->getReginaPref()Lcom/nemustech/regina/ReginaPreference;

    move-result-object v3

    invoke-virtual {v3}, Lcom/nemustech/regina/ReginaPreference;->commitPref()Z

    .line 736
    :cond_0
    iget-object v3, p0, Lcom/nemustech/regina/DialogCare$15;->this$0:Lcom/nemustech/regina/DialogCare;

    invoke-static {v3}, Lcom/nemustech/regina/DialogCare;->access$200(Lcom/nemustech/regina/DialogCare;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v3

    invoke-virtual {v3, v2}, Lcom/nemustech/regina/ReginaLauncher;->startActivity(Landroid/content/Intent;)V

    .line 737
    return-void
.end method
